﻿<phone:PhoneApplicationPage 
    xmlns:local="clr-namespace:VodafoneWP7"
    local:TiltEffect.IsTiltEnabled="True"
    x:Class="VodafoneWP7.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:c4fToolkit="clr-namespace:Coding4Fun.Phone.Controls.Toolkit;assembly=Coding4Fun.Phone.Controls.Toolkit"
    xmlns:toolbox="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Path=Strings.Title, Source={StaticResource LocalizedStrings }}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="{Binding Path=Strings.Settings, Source={StaticResource LocalizedStrings }}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid Grid.Row="1">
            <ScrollViewer >

                <StackPanel x:Name="ToggleList">

                    <toolbox:ToggleSwitch Name="ConfirmOnExit_Toggle" Header="{Binding Path=Strings.ConfirmOnExit, Source={StaticResource LocalizedStrings }}" Checked="ConfirmOnExit_Toggle_Checked" Unchecked="ConfirmOnExit_Toggle_Unchecked" />
                    
                    <!--<toolbox:ToggleSwitch Name="Allow_Center_End_Game" Header="{Binding Path=Strings.AllowVictoryByCounter, Source={StaticResource LocalizedStrings }}" Checked="Allow_Center_End_Game_Checked" Unchecked="Allow_Center_End_Game_Unchecked" />
                    <TextBlock  Name="Center_Limit_Text" Margin="-210, 0,0,0" Text="{Binding Path=Strings.CenterValueLimit, Source={StaticResource LocalizedStrings }}" FontSize="22" Height="28" Width="230" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                    <TextBox Name="Center_Limit_Area" Margin="240,-40,0,0" FontSize="24" Text="10" Width="160" TextAlignment="Center" InputScope="Number" LostFocus="Center_Limit_Lost_Focus_Click" />

                    <toolbox:ToggleSwitch Name="Allow_Timer" Header="{Binding Path=Strings.AllowTimer, Source={StaticResource LocalizedStrings }}" Checked="Allow_Timer_Checked" Unchecked="Allow_Timer_Unchecked" />
                    <TextBlock Height="30" Name="TimerTypeText" Text="{Binding Path=Strings.TimerType, Source={StaticResource LocalizedStrings }}" FontSize="24" />
                    <ListBox Height="100" Name="TimerType" Width="460" SelectionChanged="TimerType_SelectionChanged" ScrollViewer.VerticalScrollBarVisibility="Disabled" SelectionMode="Single">
                        <ListBoxItem Name="TimerType_Increasing" Content="{Binding Path=Strings.Increasing, Source={StaticResource LocalizedStrings }}" FontSize="28" HorizontalContentAlignment="Center" />
                        <ListBoxItem Name="TimerType_Decreasing" Content="{Binding Path=Strings.Decreasing, Source={StaticResource LocalizedStrings }}" FontSize="28" HorizontalContentAlignment="Center" />
                    </ListBox>

                    <TextBlock Height="30" Name="TimePickerText" Text="{Binding Path=Strings.Duration, Source={StaticResource LocalizedStrings }}" />
                    
                    <c4fToolkit:TimeSpanPicker Name="TimePicker" GotFocus="TimePicker_GotFocus" FontSize="14" DataContext="{Binding}" HorizontalContentAlignment="Center"  ValueChanged="TimePicker_ValueChanged" Step="{Binding TimeSpan5Min}" />
                   
                    <toolbox:ToggleSwitch Name="Alert_Time_Toggle" Header="{Binding Path=Strings.AllowTimedAlert, Source={StaticResource LocalizedStrings }}" Checked="Alert_Time_Toggle_Checked" Unchecked="Alert_Time_Toggle_Unchecked" />

                    <TextBlock Height="30" Name="AlertTimePickerText" Text="{Binding Path=Strings.AlarmAt, Source={StaticResource LocalizedStrings }}" />
                    
                    <c4fToolkit:TimeSpanPicker Name="AlertTimePicker" GotFocus="AlertTimePicker_GotFocus" FontSize="14" DataContext="{Binding}" HorizontalContentAlignment="Center"   ValueChanged="AlertTimePicker_ValueChanged" Step="{Binding TimeSpan5Min}" />
                    


                    <toolbox:ToggleSwitch Name="Alert_End_Time_Toggle" Header="{Binding Path=Strings.AllowTimesUpAlert, Source={StaticResource LocalizedStrings }}" Checked="Alert_End_Time_Toggle_Checked" Unchecked="Alert_End_Time_Toggle_Unchecked" />

                    

                    <TextBlock Height="40" HorizontalAlignment="Left" Name="FirstPageChoose_Text" Text="{Binding Path=Strings.InitialPage, Source={StaticResource LocalizedStrings }}" FontSize="24" FontStretch="Expanded" FontWeight="Normal" TextAlignment="Center" >
                                <toolbox:GestureService.GestureListener>
                                    <toolbox:GestureListener Tap="GestureListener_Tap" />
                                </toolbox:GestureService.GestureListener>
                    </TextBlock>

                    <Border Name="FirstPageChoose_Border" BorderThickness="3" Padding="6">
                        <toolbox:GestureService.GestureListener>
                            <toolbox:GestureListener Tap="GestureListener_Tap" />
                        </toolbox:GestureService.GestureListener>
                        <toolbox:ContextMenuService.ContextMenu>
                            <toolbox:ContextMenu>
                                <toolbox:MenuItem Name="FirstPageChoose0_Name" Header="{Binding Path=Strings.Match, Source={StaticResource LocalizedStrings }}" Click="FirstPageChoose_Click" />
                                <toolbox:MenuItem Name="FirstPageChoose1_Name" Header="{Binding Path=Strings.Mana, Source={StaticResource LocalizedStrings }}" Click="FirstPageChoose_Click" />
                                <toolbox:MenuItem Name="FirstPageChoose2_Name" Header="{Binding Path=Strings.History, Source={StaticResource LocalizedStrings }}" Click="FirstPageChoose_Click" />
                                <toolbox:MenuItem Name="FirstPageChoose3_Name" Header="{Binding Path=Strings.Search, Source={StaticResource LocalizedStrings }}" Click="FirstPageChoose_Click" />
                                <toolbox:MenuItem Name="FirstPageChoose4_Name" Header="{Binding Path=Strings.Helps, Source={StaticResource LocalizedStrings }}" Click="FirstPageChoose_Click" />
                                
                            </toolbox:ContextMenu>
                        </toolbox:ContextMenuService.ContextMenu>
                        <TextBlock Name="FirstPageChoose_Area" Text="{Binding Path=Strings.Match, Source={StaticResource LocalizedStrings }}"  FontSize="26" TextAlignment="Center" />
                    </Border>

                    <toolbox:ToggleSwitch Name="Allow_ShortCuts" Header="{Binding Path=Strings.AllowShortCuts, Source={StaticResource LocalizedStrings }}" Checked="Allow_ShortCuts_Checked" Unchecked="Allow_ShortCuts_Unchecked" />

                    

                    <toolbox:ToggleSwitch Name="AllowScreenOffToggle" Header="{Binding Path=Strings.AllowRunScreenOff, Source={StaticResource LocalizedStrings }}" Checked="AllowScreenOffToggle_Checked" Unchecked="AllowScreenOffToggle_Unchecked"  />-->

                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
